package com.disability_federation.mapper;

import com.disability_federation.pojo.AmountUsageDetails;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 残保金使用明细-数据库接口
 * 默认时间升序排序
 */
@Mapper
public interface MapperAmountUsageDetails {

    //查询全部使用明细
    //默认时间升序排序
    @Select("select * from amount_usage_details.amount_usage_details order by use_time")
    List<AmountUsageDetails> query();

    //查询全部使用明细
    //时间降序排序
    @Select("select * from amount_usage_details.amount_usage_details order by use_time desc")
    List<AmountUsageDetails> queryDesc();

    //查询全部使用明细
    //用户名升序排序
    @Select("select * from amount_usage_details.amount_usage_details order by user_name")
    List<AmountUsageDetails> queryUserAsc();

    //查询全部使用明细
    //用户名降序排序
    @Select("select * from amount_usage_details.amount_usage_details order by user_name desc")
    List<AmountUsageDetails> queryUserDesc();

    //查询全部使用明细
    //单位升序排序
    @Select("select * from amount_usage_details.amount_usage_details order by unit")
    List<AmountUsageDetails> queryEnterpriseAsc();

    //查询全部使用明细
    //单位降序排序
    @Select("select * from amount_usage_details.amount_usage_details order by unit desc")
    List<AmountUsageDetails> queryEnterpriseDesc();

    //查询全部使用明细
    //金额升序排序
    @Select("select * from amount_usage_details.amount_usage_details order by money desc")
    List<AmountUsageDetails> queryMoneyAsc();

    //查询全部使用明细
    //金额降序排序
    @Select("select * from amount_usage_details.amount_usage_details order by money")
    List<AmountUsageDetails> queryMoneyDesc();

    //根据条件查询使用明细
    //默认时间升序排序
    List<AmountUsageDetails> queryByCondition(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //时间降序排序
    List<AmountUsageDetails> queryByConditionDesc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //用户名升序排序
    List<AmountUsageDetails> queryByConditionUserAsc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //用户名降序排序
    List<AmountUsageDetails> queryByConditionUserDesc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //单位升序排序
    List<AmountUsageDetails> queryByConditionEnterpriseAsc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //单位降序排序
    List<AmountUsageDetails> queryByConditionEnterpriseDesc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //金额升序排序
    List<AmountUsageDetails> queryByConditionMoneyAsc(String userName, String unitName, Integer money1, Integer money2);

    //根据条件查询使用明细
    //金额降序排序
    List<AmountUsageDetails> queryByConditionMoneyDesc(String userName, String unitName, Integer money1, Integer money2);
}
